﻿using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;

namespace GBricks.Collections
{
  public static class EmptyArray<T>
  {
    private static readonly T[] Empty = new T[0];

    [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = Justifications.ArrayIsEmpty)]
    public static T[] Value {
      [DebuggerStepThrough]
      get {
        Contract.Ensures(Contract.Result<T[]>() != null);
        return Empty;
      }
    }
  }
}
